package com.cloud.code.算法.排序.选择排序;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User implements Comparable{

    private String userName;

    private int age;

    @Override
    public int compareTo(Object o) {
        User user = (User) o;
        return this.age - user.age;
    }
}
